"use strict";

function Request() {
  this.url = 'Request'
  this.get = function(params = {}) {
    var option = Object.keys(params).map(k => {
      return `${k}=${params[k]}`
    }).join('&')

    return `获取数据 API:${this.url}?${option}`;
  }
}


function Article()  {
  Request.apply(this, []);
  this.url = 'article/index'
}


var article = new Article()
console.log(article.get({
    row: 10,
    start: 3
  }))


//课程控制器
function Lesson() {
  this.url = "lesson/index";
  Request.call(this);
}
let js = new Lesson();
console.log(
  js.get({
    row: 20
  })
);